package com.hxf.dto;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.PolymorphismType;

/**
 * 评价表
 * @author tengyicheng
 */
@Entity
@Table(name="rk_appraisal")
@org.hibernate.annotations.Entity(selectBeforeUpdate = true,dynamicInsert = true,dynamicUpdate = true, polymorphism = PolymorphismType.EXPLICIT)
public class AppraisalDto extends BaseDto {

	private static final long serialVersionUID = 1L;
	private Integer id;
	private Integer appUserId;// 评价人 ID
	private Integer appraisalTypeId;//评价类型  id
	private String appUserName;//评价人姓名
	private Integer score;//评分
	private String createDate;//时间
	private String appraisalInfo;//评价信息
	private Integer appraisalType;//评价类型  1:餐厅评价  2:菜肴评价 3:优惠评价
	private Integer status;// 0为不作废   1 为作废  
	private Integer restaurantId;//餐厅ID
	private Integer credit;  //信用
	private Integer userLevel;//会员信用
	
	/**
	 * 优惠评价
	 */
	public static final int APPRAISAL_TYPE_0 = 0;
	/**
	 * 菜品评价
	 */
	public static final int APPRAISAL_TYPE_1 = 1;
	
	/**
	 * 餐厅评价
	 */
	public static final int APPRAISAL_TYPE_2 = 2;
	
	public AppraisalDto(){}
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id")
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "app_user_id")
	public Integer getAppUserId() {
		return appUserId;
	}
	public void setAppUserId(Integer appUserId) {
		this.appUserId = appUserId;
	}
	
	@Column(name = "appraisal_type_id")
	public Integer getAppraisalTypeId() {
		return appraisalTypeId;
	}
	public void setAppraisalTypeId(Integer appraisalTypeId) {
		this.appraisalTypeId = appraisalTypeId;
	}
	
	@Column(name = "app_user_name")
	public String getAppUserName() {
		return appUserName;
	}
	public void setAppUserName(String appUserName) {
		this.appUserName = appUserName;
	}
	
	@Column(name = "score")
	public Integer getScore() {
		return score;
	}
	public void setScore(Integer score) {
		this.score = score;
	}
	
	@Column(name = "create_date")
	public String getCreateDate() {
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	
	@Column(name = "appraisal_info")
	public String getAppraisalInfo() {
		return appraisalInfo;
	}
	public void setAppraisalInfo(String appraisalInfo) {
		this.appraisalInfo = appraisalInfo;
	}
	
	@Column(name = "appraisal_type")
	public Integer getAppraisalType() {
		return appraisalType;
	}
	public void setAppraisalType(Integer appraisalType) {
		this.appraisalType = appraisalType;
	}
	
	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name="restaurant_id")
	public Integer getRestaurantId() {
		return restaurantId;
	}

	public void setRestaurantId(Integer restaurantId) {
		this.restaurantId = restaurantId;
	}
	
	@Column(name="credit")
	public Integer getCredit() {
		return credit;
	}

	public void setCredit(Integer credit) {
		this.credit = credit;
	}

	@Column(name="user_level")
	public Integer getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(Integer userLevel) {
		this.userLevel = userLevel;
	}

	@Override
	public String toString() {
		return "AppraisalDto [id=" + id + ", appUserId=" + appUserId
				+ ", appraisalTypeId=" + appraisalTypeId + ", appUserName="
				+ appUserName + ", score=" + score + ", createDate="
				+ createDate + ", appraisalInfo=" + appraisalInfo
				+ ", appraisalType=" + appraisalType + ", status=" + status
				+ "]";
	}



}
